package etnorservice.etnor_service.mapper;

import etnorservice.etnor_service.domain.dto.ArticleQueryParam;
import etnorservice.etnor_service.domain.po.Article;
import etnorservice.etnor_service.domain.po.Category;
import etnorservice.etnor_service.domain.po.Tag;
import etnorservice.etnor_service.domain.po.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: cc
 * @Date: 2025/03/05/14:43
 **/
@Mapper
public interface BlogMapper {
    List<Article> selectArticleList(ArticleQueryParam param);
    Article selectArticleById(@Param("id") Long id);
    List<Category> selectCategoryList();
    List<Tag> selectTagList();
    List<Tag> selectTagsByArticleId(@Param("articleId") Long articleId);
    int incrementViewCount(@Param("id") Long id);
    UserInfo selectUserById(@Param("id") Long id);
    // 添加获取热门标签的方法
    List<Tag> selectHotTags(@Param("limit") int limit);
}